section3

peter Stewart 8/23/2017


In c++ we use function parameters to pass information to the function.
Once the information has ben passed the function can do what ever it wants with that information.
But when you pass your information to the function it passes a copy not the real thing.
To pass the real thing you must pass by reference instead of passing by value.


You can specify a functions return type by putting what type of variable
you want it to return in front of the function such as I do in the code bellow:
int peters_function()
{
return 518;
}
the code I just typed is a example of a function that return a int as specified in the declaration above.
The function then returns a int back to the place where the function was called. For example:
int main()
{
int x = peters_function()
return0;
}


This is the famous Wilhelm scream